Gamma adjustment, or, as it is often simply referred to, “gamma,” is the name given to the nonlinear operation commonly used to encode luma values and decode luminance values in video or still image systems. Gamma, γ, may be defined by the following simple power-law expression: Lout=Linγ, where the input and output values, Lin and Lout, respectively, are non-negative real values, typically in a predetermined range, e.g., zero to one. A gamma value greater than one is sometimes called an encoding gamma, and the process of encoding with this compressive power-law nonlinearity is called gamma compression; conversely, a gamma value less than one is sometimes called a decoding gamma, and the application of the expansive power-law nonlinearity is called gamma expansion. Gamma encoding helps to map data into a more perceptually uniform domain.
Another way to think about the gamma characteristic of a system is as a power-law relationship that approximates the relationship between the encoded luma in the system and the actual desired image luminance on whatever the eventual user display device is. In existing systems, a computer processor or other suitable programmable control device may perform gamma adjustment computations for a particular display device it is in communication with based on the native luminance response of the display device, the color gamut of the device, and the device's white point (which information may be stored in an ICC profile), as well as the ICC color profile the source content's author attached to the content to specify the content's “rendering intent.” The ICC profile is a set of data that characterizes a color input or output device, or a color space, according to standards promulgated by the International Color Consortium (ICC). ICC profiles may describe the color attributes of a particular device or viewing requirement by defining a mapping between the device source or target color space and a profile connection space (PCS), usually the CIE XYZ color space. ICC profiles may be used to define a color space generically in terms of three main pieces: 1) the color primaries that define the gamut; 2) the transfer function (sometimes referred to as the gamma function); and 3) the white point. ICC profiles may also contain additional information to provide mapping between a display's actual response and its “advertised” response, i.e., its tone response curve (TRC).
In some embodiments, the display device's color profile may be managed using the COLORSYNC® Application Programmer Interface (API). (COLORSYNC® is a registered trademark of Apple Inc.) In some embodiments, the ultimate goal of the COLORSYNC® process is to have an eventual overall 1.0 gamma boost, i.e., unity, applied to the content as it is displayed on the display device. An overall 1.0 gamma boost corresponds to a linear relationship between the input encoded lama values and the output luminance on the display device, meaning there is actually no amount of gamma “boosting” being applied.
A color space may be defined generically as a color model, i.e., an abstract mathematical model describing the way colors can be represented as tuples of numbers, that is mapped to a particular absolute color space. For example, RGB is a color model, whereas sRGB, AdobeRGB and Apple RGB are particular color spaces based on the RGB color model. The particular color space utilized by a device may have a profound effect on the way color information created or displayed on the device is interpreted. The color spaces utilized by both a source device as well as the display device in a given scenario may be characterized by an “ICC profile.
In some embodiments, image values, e.g., pixel luma values, enter a “framebuffer” having come from an application or applications that have already processed the image values to be encoded with a specific implicit gamma. A framebuffer may be defined as a video output device that drives a video display from a memory buffer containing a complete frame of, in this case, image data. The implicit gamma of the values entering the framebuffer can be visualized by looking at the “Framebuffer Gamma Function,” as will be explained further below. Ideally, this Framebuffer Gamma Function is the exact inverse of the display device's “Native Display Response” function, which characterizes the luminance response of the display to input. However, because the inverse of the Native Display Response isn't always exactly the inverse of the framebuffer, a “Look Up Table” (LUT), sometimes stored on a video card, may be used to account for the imperfections in the relationship between the encoding gamma and decoding gamma values, as well as the display's particular luminance response characteristics.
The transformation applied by the LUT to the incoming framebuffer data before the data is output to the display device ensures the desired 1.0 gamma boost on the eventual display device. This is generally a good system, although it does not take into account the effect on the viewer of the display device's perception of gamma due to differences in ambient light conditions. In other words, the 1.0 gamma boost is only achieved in one ambient lighting environment, and this environment is brighter than normal office environment.
Today, consumer electronic products having display screens are used in a multitude of different environments with different lighting conditions, e.g., the office, the home, home theaters, and outdoors. Thus, there is a need for techniques to implement an ambient-aware system that is capable of dynamically adjusting an ambient model for a display such that the viewer's perception of the data displayed remains relatively independent of the ambient conditions in which the display is being viewed.